<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/facelets/tags">

<h:head>
	<title>SiGlog</title>
	<link rel="shortcut icon" href="imagens/favicon.ico"
		type="image/x-icon" />
	<script src="js/javascript.js" type="text/javascript" />
</h:head>

<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit
			header="Sistema Georreferenciado de Logradouros (SiGlog)"
			position="north" size="110" resizable="false" closable="false"
			collapsible="false" style="text-align:center;">
			<h:form>
				<p:toolbar>
					<p:toolbarGroup align="left">
						<p:commandButton value="Home" type="button" icon="ui-icon-home"
							onclick="location.reload()" />

						<p:commandButton value="Site oficial" icon="ui-icon-tag"
							onclick="document.location='http://www2.recife.pe.gov.br/'" />
					</p:toolbarGroup>

					<p:toolbarGroup align="right">
						<p:commandButton value="Sair" icon="ui-icon-extlink"
							onclick="document.location='#{request.contextPath}/j_spring_security_logout'" />
					</p:toolbarGroup>
				</p:toolbar>
			</h:form>
		</p:layoutUnit>

		<p:layoutUnit header="Menu" position="west" size="200"
			resizable="false" closable="false" collapsible="false">
			<p:accordionPanel>
				<p:tab title="Bairro">
					<div class="menu">
						<a href="bairro_lista.jsf"> <p:commandButton type="button"
								value="Consultar" icon="ui-icon-search" />
						</a>
						<p:separator />
						<a href="bairro_novo.jsf"> <p:commandButton type="button"
								value="Novo" icon="ui-icon-contact" />
						</a>
						<p:commandButton type="button" value="Demarcar"
							icon="ui-icon-pencil"
							onclick="document.location='bairro_demarcacao.jsf'" />
					</div>
				</p:tab>

				<p:tab title="Logradouro">
					<div class="menu">
						<a href="logradouro_lista.jsf"> <p:commandButton type="button"
								value="Consultar" icon="ui-icon-search" />
						</a> <a href="logradouro_lista_delimitadores.jsf"> <p:commandButton
								type="button" value="Limites" icon="ui-icon-clipboard" />
						</a>
						<p:separator />
						<a href="logradouro_novo.jsf"> <p:commandButton type="button"
								value="Novo" icon="ui-icon-contact" />
						</a>
						<p:commandButton type="button" value="Demarcar"
							icon="ui-icon-pencil"
							onclick="document.location='logradouro_demarcacao.jsf'" />
					</div>
				</p:tab>

				<p:tab title="Face de quadra">
					<div class="menu">
						<a href="facequadra_lista.jsf"> <p:commandButton type="button"
								value="Consultar" icon="ui-icon-search" />
						</a> <a href="facequadra_lista_servicos.jsf"> <p:commandButton
								type="button" value="Serviços" icon="ui-icon-cart" />
						</a>
						<p:separator />
						<a href="facequadra_novo.jsf"> <p:commandButton type="button"
								value="Novo" icon="ui-icon-contact" />
						</a>
					</div>
				</p:tab>

				<sec:ifAnyGranted roles="ROLE_ADMINISTRADOR">
					<p:tab title="Funcionário">
						<div class="menu">
							<a href="funcionario_lista.jsf"> <p:commandButton
									type="button" value="Consultar" icon="ui-icon-search" />
							</a>
							<p:separator />
							<a href="funcionario_novo.jsf"> <p:commandButton
									type="button" value="Novo" icon="ui-icon-contact" />
							</a>
						</div>
					</p:tab>
				</sec:ifAnyGranted>
			</p:accordionPanel>
		</p:layoutUnit>

		<p:layoutUnit position="south" size="40" resizable="false"
			closable="false" collapsible="false">
			<center>Copyright 2014. Codebreakers Softwares. All rights
				reserved.</center>
		</p:layoutUnit>

		<p:layoutUnit id="display" position="center">
			<p:imageSwitch effect="turnDown">
				<ui:repeat value="#{imagesView.images}" var="image">
					<p:graphicImage url="imagens/#{image}" />
				</ui:repeat>
			</p:imageSwitch>
		</p:layoutUnit>
	</p:layout>
</h:body>
</html>